import { path } from "../../utils/config";
import { userInfo } from '../../utils/api';
const app = getApp();
Page({
  data: {
    content: ""
  },
  async onLoad(options) {
    let { pile_owner_shuoming } = await userInfo();
    // let content = pile_owner_shuoming.replace(/\<img/gi, '<img style="width:100%;height:auto"')
    let content = pile_owner_shuoming?.replace(/\<img/gi, '<img style="width:100%;height:auto"')
      .replace(/<video/gi, '<video style="width:100%"')
      .replace(/<section/g, '<div')
      .replace(/\/section>/g, '\div>');
    this.setData({ content });
  },
  onShareAppMessage() {
    let poster = app.globalData.poster;
    return {
      path,
      imageUrl: poster
    }
  },
  onShareTimeline() { }
})